package t4tools.splittingObjects.test.filter;

import java.util.Arrays;
import java.util.List;

import t4tools.splittingObjects.filter.RowFilter;
import t4tools.splittingObjects.model.Cell;
import t4tools.splittingObjects.model.Row;

public class RedAndBlueFilter implements RowFilter {

	private static final List<String> COLORS = Arrays.asList("red", "blue");

	public boolean apply(Row row) {
		Cell cell = row.getCell("favColors");
		return cell != null && cell.getStringValue() != null && COLORS.contains(cell.getStringValue());
	}

}
